package com.wanxi.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author Li
 * @Date 2023/5/7 14:51
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
@ApiModel(value = "新闻类型", description = "描述新闻类型对象")
@TableName("news_type")
public class NewsTypeModel {
    @TableId(value = "id", type = IdType.ASSIGN_ID)//雪花算法
    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "新闻类型id", example = "1678239961299619841")
    private Long id;
    @ApiModelProperty(value = "新闻类型名称", example = "最新资讯")
    private String newType;
    @ApiModelProperty(value = "创建时间", example = "2023-07-04 10:42:20")
    private String createTime;
    @ApiModelProperty(value = "修改时间", example = "2023-07-04 10:42:20")
    private String updateTime;
    @ApiModelProperty(value = "可用状态", example = "1")
    private Integer enable;
    @ApiModelProperty(value = "备注", example = "本条为最新资讯新闻类型")
    private String remark;

    @TableField(exist = false)
    @ApiModelProperty(value = "页数", example = "1")
    private Integer page; //页数
    @TableField(exist = false)
    @ApiModelProperty(value = "查询条数", example = "10")
    private Integer limit; //条数


}
